<!--加载js-->
<script src="/static/common/plugins/Charts/amcharts.js" type="text/javascript"></script>

<!--主页面-->
<div class="side-left fl mt10">
    <div class="box">
        <h2>个人信息</h2>
        <ul class="status">
            <li class="risk first-child">
                <p>
                    <i class="img"></i>
                    <strong>{:get_login_phone()}</strong><br><span class="gray">账号：{$admin_info['admin_phone']}<br>电话：{$admin_info['admin_phone']}</span>
                </p>
                <a class="status-btn exam"  style="" href="{:Url('admin/admin_info')}">完善信息</a>
            </li>
            <li style="font-size: 11px"><p><span class="fl">最后登录数据：{$admin_info['login_time']}</span><span class="fr">最后登录IP：{$admin_info['login_ip']}</span></p></li>
        </ul>
    </div>
    <div class="box">
        <h2>主要功能快捷入口</h2>
        <div class="clear_fix">
            <ul class="entrance">
                <li style="height: 32px;">
                    <a href="{:Url('/admin/pool_bid/pool_bid_agent_list')}"><img src="/static/admin/img/dp_icon2.gif" class="fl" style="width: 35px;height: 30px;"></a>
                    <a class="txt" href="{:Url('/admin/pool_bid/pool_bid_agent_list')}">
                        <h2>客户贷款通申请</h2>
                    </a>
                </li>
                <li style="height: 32px;">
                    <a href="{:Url('/admin/pool_bid/pool_bid_not_list')}"><img src="/static/admin/img/icon16.png" class="fl" style="width: 35px;height: 30px;"></a>
                    <a class="txt" href="{:Url('/admin/pool_bid/pool_bid_not_list')}">
                        <h2>合作商招投标客户池</h2>
                    </a>
                </li>
                <li style="height: 32px;">
                    <a href="{:Url('/admin/user/user_list')}"><img src="/static/admin/img/sp_icon3.gif" class="fl" style="width: 35px;height: 30px;"></a>
                    <a class="txt" href="{:Url('/admin/user/user_list')}">
                        <h2>用户管理</h2>
                    </a>
                </li>
                <li style="height: 32px;">
                    <a href="{:Url('/admin/cooperate/cooperate_list')}"><img src="/static/admin/img/qd_icon1.gif" class="fl" style="width: 35px;height: 30px;"></a>
                    <a class="txt" href="{:Url('/admin/cooperate/cooperate_list')}">
                        <h2>合作商管理</h2>
                    </a>
                </li>
                <li style="height: 32px;">
                    <a href="{:Url('/admin/agent/agent_list')}"><img src="/static/admin/img/oa_icon4.gif" class="fl" style="width: 35px;height: 30px;"></a>
                    <a class="txt" href="{:Url('/admin/agent/agent_list')}">
                        <h2>信贷经理管理</h2>
                    </a>
                </li>
            </ul>
        </div>
    </div>


    <div class="box">
        <h2>省份客户数量排名</h2>
        <div class="clear_fix">
            <ul class="show_total">
                {foreach name="province" item="info"}
                    <li class="fl">
                        <img src="/static/admin/img/1.jpg" class="fl">
                        <h2 style="font-size:14px; border:none; padding:0;">{$info['name']}：<i class="orange">{$info['num']}</i></h2>
                    </li>
                {/foreach}
            </ul>
        </div>
    </div>
</div>



<div class="side-m fl mt10">
    <div class="box2">
        <h2>客户注册量柱形图<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<b>一个月的客户注册量</b></font></h2>
        <div class="item_chart">
            <div class="item_total">
                <ul>

                </ul>
                <div class="clear_fix"></div>
            </div>
            <div id="user_customer" style="height:300px;"></div>

            <script type="text/javascript">
                var chart;
                AmCharts.ready(function () {
                    chart = new AmCharts.AmSerialChart();
                    chart.dataProvider = json['user_customer'];
                    chart.categoryField = "create_time";
                    chart.startDuration = 1;


                    //xy轴
                    var valueAxis = new AmCharts.ValueAxis();
                    valueAxis.axisColor="#777";
                    valueAxis.axisThickness=1;
                    valueAxis.title='客户数量';
                    chart.addValueAxis(valueAxis);

                    var categoryAxis = chart.categoryAxis;
                    // categoryAxis.labelRotation =45 ;//X轴下面值的角度

                    var graph = new AmCharts.AmGraph();
                    graph.valueField = "num";//柱形图显示的值
                    // graph.balloonText = "[[name]]: [[num]]";//鼠标放上所显示的
                    graph.type = "column";//Y轴的类型 有line、column、step、smoothedLine、candlestick、ohlc
                    graph.lineAlpha = 0;//border透明度
                    graph.fillAlphas = 0.8;//柱子的透明度
                    chart.addGraph(graph);

                    chart.write("user_customer");
                });
            </script>
        </div>
    </div>

    <div class="box2">
        <h2>合作商开标数量柱形图<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<b>一个月的发标数量</b></font></h2>
        <div class="item_chart">
            <div class="item_total">
                <ul>

                </ul>
                <div class="clear_fix"></div>
            </div>
            <div id="pool_bid_customer" style="height:300px;"></div>

            <script type="text/javascript">
                var chart;
                AmCharts.ready(function () {
                    chart = new AmCharts.AmSerialChart();
                    chart.dataProvider = json['pool_bid_customer'];
                    chart.categoryField = "create_time";
                    chart.startDuration = 1;


                    //xy轴
                    var valueAxis = new AmCharts.ValueAxis();
                    valueAxis.axisColor="#777";
                    valueAxis.axisThickness=1;
                    valueAxis.title='发标数量';
                    chart.addValueAxis(valueAxis);

                    var categoryAxis = chart.categoryAxis;
                    // categoryAxis.labelRotation =45 ;//X轴下面值的角度

                    var graph = new AmCharts.AmGraph();
                    graph.valueField = "num";//柱形图显示的值
                    // graph.balloonText = "[[name]]: [[num]]";//鼠标放上所显示的
                    graph.type = "column";//Y轴的类型 有line、column、step、smoothedLine、candlestick、ohlc
                    graph.lineAlpha = 0;//border透明度
                    graph.fillAlphas = 0.8;//柱子的透明度
                    chart.addGraph(graph);

                    chart.write("pool_bid_customer");
                });
            </script>
        </div>
    </div>

    <div class="box2">
        <h2>客户申请走势图<font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<b>一个月的申请量</b></font></h2>
        <div class="item_chart">
            <div class="item_total">
                <ul>
                    {foreach name="company" item="info"}
                    <li><h3>{$info["name"]}</h3><h4>{$info['num']|number_format=###,0}</h4></li>
                    {/foreach}
                </ul>
                <div class="clear_fix"></div>
            </div>
            <div id="user_apply" style="width:99%; height:300px;"></div>

            <script type="text/javascript">
                var chart;

                AmCharts.ready(function () {
                    chart = new AmCharts.AmSerialChart();
                    chart.dataProvider = json['user_apply'];
                    chart.categoryField = "date_time";

                    var categoryAxis = chart.categoryAxis;
                    categoryAxis.dashLength = 2;
                    categoryAxis.gridAlpha = 0.15;
                    categoryAxis.axisColor = "#DADADA";

                    var valueAxis1 = new AmCharts.ValueAxis();
                    valueAxis1.axisColor = "#FF0F00";
                    valueAxis1.axisThickness = 2;
                    valueAxis1.gridAlpha = 0;
                    chart.addValueAxis(valueAxis1);

                    var valueAxis2 = new AmCharts.ValueAxis();
                    valueAxis2.position = "right";
                    valueAxis2.axisColor = "#FF6600";
                    valueAxis2.gridAlpha = 0;
                    valueAxis2.axisThickness = 2;
                    chart.addValueAxis(valueAxis2);

                    var graph1 = new AmCharts.AmGraph();
                    graph1.valueAxis = valueAxis1;
                    graph1.title = "申请贷款数量";
                    graph1.valueField = "loan_num";
                    graph1.bullet = "round";
                    graph1.hideBulletsCount = 30;
                    chart.addGraph(graph1);

                    var graph2 = new AmCharts.AmGraph();
                    graph2.valueAxis = valueAxis2;
                    graph2.title = "申请信用卡数量";
                    graph2.valueField = "credit_num";
                    graph2.bullet = "round";
                    graph2.hideBulletsCount = 30;
                    chart.addGraph(graph2);

                    var chartCursor = new AmCharts.ChartCursor();
                    chartCursor.cursorPosition = "mouse";
                    chart.addChartCursor(chartCursor);

                    var legend = new AmCharts.AmLegend();
                    legend.marginLeft = 110;
                    chart.addLegend(legend);

                    chart.write("user_apply");
                });
            </script>
        </div>
    </div>
</div>
